/**
  ******************************************************************************
  * @file    Project/m1130-EVAL/main.c 
  * @author  Alpscale Software Team 
  * @version V1.0.0
  * @date    19-December-2013
  * @brief   Main program body
  ******************************************************************************
  * @attention
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, ALPHASCALE SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2013 Alphascale</center></h2>
  ******************************************************************************
  */  

/* Includes ------------------------------------------------------------------*/
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "m1130_uart.h" 
#include "m1130_gpio.h" 
#include "m1130_rcc.h"	 
#include "misc.h"
#include "m1130_dma.h"
#include "m1130_wdg.h"
#include "m1130_rtc.h"
#include "m1130_utility_rtc.h"
#include "m1130_utility_usart.h"


void RTC_Configuration(void);


int main()
{
  //SCB->AIRCR = 0x05fa0500;

  UART_Configuration(UART1, 115200, UART1_GP2);
  printf("\r\n-----------------|- m1130 Standard Peripheral Library Driver -|-----------------\r\n");
  RTC_Configuration();

  RCC->PDAWAKECFG &= ~(1 << 4);
  RCC->PDSLEEPCFG &= ~(1 << 4);
  commonDelay(400000);

 	goSleep(SM_POWERDOWN);
 	printf("wake up\r\n");
  while(1)
  {
    
  }
}


